package site.codeyin.javautils.utils.type;

import cn.hutool.core.lang.TypeReference;
import cn.hutool.json.JSONUtil;
import com.google.common.collect.ImmutableMap;

import java.util.Map;

/**
 * @author <a href="https://github.com/liangcheng2221">yinjie</a>
 * @date 2024-10-07 11:46
 */
public class Main {
    public static void main(String[] args) {
        Map<String, String> map = ImmutableMap.of("yinjie", "yinjie", "liangcheng", "liangcheng");

        System.out.println(JSONUtil.toBean(JSONUtil.toJsonStr(map), new TypeReference<Map<String, String>>() {
        }, true));

    }
}
